Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove docker from QGIS tests #943

Merged
merged 21 commits into from
Feb 8, 2024
Merged

Remove docker from QGIS tests #943

merged 21 commits into from
Feb 8, 2024

Conversation

deltamarnix
Copy link
Contributor

@deltamarnix deltamarnix commented Jan 12, 2024

The tests are now run via the qgis_testrunner script that is a clone from the original QGIS runner: https://github.com/qgis/QGIS/blob/4891c6bda8922ff5c6a70021f097ce43c486cddf/.docker/qgis_resources/test_runner/qgis_testrunner.py. I removed the if check for being inside or outside of QGIS, because not every module was available in Windows.

The QGIS profile information and the plugins themselves are now installed inside of the .pixi folder, so that cleanup is easier. And there is no need anymore for looking into the roaming folder.

The QGIS tests that really require the user interface are called via test-ribasim-qgis-ui. This task is not automated.
The QGIS tests that do not require the user interface are called via test-ribasim-qgis and are automated via github actions.

Use local pytest instead.
Had to remove the two tests that really instantiate the GUI.
@deltamarnix deltamarnix requested a review from evetion January 12, 2024 14:49
Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit sad that we cannot test GUI functionality anymore.
On the flip side, this setup is much simpler, and we now test on macOS and Windows as well.

Copy link
Member

@evetion evetion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is akin to removing tests because they fail, instead of fixing them. Especially the first removed test (plugin load) seems essential for guaranteeing the QGIS plugin will work. Note that the remaining plugins purely tests internal consistency of code (syntax mostly), not whether it is a valid plugin at all.

@visr
Copy link
Member

visr commented Jan 15, 2024

I guess this can be closed in favor of #939. Still would be nice to be able to drop Docker from our test stack, given we have QGIS in our Pixi environment as well, but preferably not at the cost of reduced testing capability.

@Hofer-Julian
Copy link
Contributor

I guess this can be closed in favor of #939. Still would be nice to be able to drop Docker from our test stack, given we have QGIS in our Pixi environment as well, but preferably not at the cost of reduced testing capability.

Since the latest attempt also didn't fix it, maybe we merge this and add a high priority issue to add something equivalent with pixi? Or does anyone want to give docker another try?

@evetion
Copy link
Member

evetion commented Jan 16, 2024

I guess this can be closed in favor of #939. Still would be nice to be able to drop Docker from our test stack, given we have QGIS in our Pixi environment as well, but preferably not at the cost of reduced testing capability.

Since the latest attempt also didn't fix it, maybe we merge this and add a high priority issue to add something equivalent with pixi? Or does anyone want to give docker another try?

Yeah, I have given up on the Docker path (although I don't expect it is the root cause), but I can try the pixi path in this branch.

@visr
Copy link
Member

visr commented Jan 16, 2024

Make sure to merge main, which has a more recent QGIS that is not broken.

@deltamarnix deltamarnix marked this pull request as draft January 16, 2024 09:31
evetion and others added 2 commits January 16, 2024 10:32
Windows and Linux should be the same
QGIS plugins are now installed as user plugins within the environment,
and not as core plugins.
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@deltamarnix deltamarnix requested a review from evetion January 23, 2024 16:15
@deltamarnix deltamarnix marked this pull request as ready for review January 25, 2024 16:42
@evetion
Copy link
Member

evetion commented Feb 8, 2024

I can't run the tests locally because of qgis/QGIS#52987 on mac, but it seems to be setup ok. 👍🏻

@evetion evetion merged commit 91a3968 into main Feb 8, 2024
21 checks passed
@evetion evetion deleted the fix/remove-docker-qgis-tests branch February 8, 2024 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants